/**
 * @name 流程节点
 * @des 用于描述节点的状态，不可编辑，只是辅助作用
 */

import { Component, Input, OnInit } from "@angular/core";
import { ProcessPnode } from "src/app/@types/pnode";

@Component({
    selector: "process-pnode",
    styles: [
        `
            :host .ico-wrapper::after {
                border-radius: 50%;
                border-style: dashed;
            }
        `,
    ],
    template: `
        <div class="node-wrapper" style="cursor: inherit;">
            <div class="ico-wrapper" [ngSwitch]="data.config.mode">
                <!-- 开始 -->
                <img
                    *ngSwitchCase="0"
                    src="https://gitee.com/lyq2/blog-images/raw/master/imgs/process-start.png"
                    alt="ico"
                />
                <!-- 暂停 -->
                <img
                    *ngSwitchCase="1"
                    src="https://gitee.com/lyq2/blog-images/raw/master/imgs/process-during.png"
                    alt="ico"
                />
                <!-- 结束 -->
                <img
                    *ngSwitchCase="2"
                    src="https://gitee.com/lyq2/blog-images/raw/master/imgs/process-end.png"
                    alt="ico"
                />
            </div>
        </div>
    `,
})
export class ProcessComponent implements OnInit {
    @Input() data: ProcessPnode;

    constructor() {}

    ngOnInit(): void {}
}
